<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<title>会员</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="jquery-easyui-1.4.2/themes/gray/easyui.css">
<link rel="stylesheet" href="jquery-easyui-1.4.2/themes/icon.css">
<script src="jquery-easyui-1.4.2/jquery.min.js"></script>
<script src="jquery-easyui-1.4.2/jquery.easyui.min.js"></script>
<script src="jquery-easyui-1.4.2/locale/easyui-lang-zh_CN.js"></script>
<script src="jquery-validation-1.11.1/jquery.validate.js"></script>
<script src="js/index.js" charset="utf-8"></script>
<script src="js/customer.js"></script>
<style type="text/css">
	input{
		border-radius:5px;
		border:1px solid #ccc;
	}
	.datagrid-row {
        height: 32px;
    }
    /*表格行样式*/
    .datagrid-row td div {
    	font-size:14px;/* 本来是18 */
    	font-family:Microsoft YaHei;
    	color:black;
    }
</style>

</head>

<body>
	<div style="width:100%;height:100%;padding:0px;overflow:hidden">
	
		<!-- 表格 -->
		<table id="customer_grid"></table>
			
		<!-- 添加会员的对话框 -->
		<div id="customer_add_dialog" style="padding-right:60px;width:400px;height: 320px;text-align:right">	
			<form id="form" method="post">
				<div style="margin:10px;">
					<div style="float:left;width:90px;">姓名：</div> 
					<input name="name" class="easyui-textbox" style="width:200px;"
						data-options="required:true" />
				</div>
				<div style="margin:10px;">
					<div style="float:left;width:90px;">性别：</div> 
					<select name="gender" id="add_gender" style="width:200px;"
						data-options="editable:false,panelHeight:'auto'">
						<option>男</option>
						<option>女</option>
					</select>
				</div>
				<div style="margin:10px;">
					<div style="float:left;width:90px;">折扣：</div> 
					<input id="add_discount" name="discount" class="easyui-textbox" style="width:200px;"
						data-options="editable:false,value:'0.95'" />
				</div>
				<div style="margin:10px;">
					<div style="float:left;width:90px;">会员积分：</div> 
					<input name="integral" id="add_integral" class="easyui-textbox" style="width:200px;" 
					data-options="editable:false,value:'0'"/>
				</div>
				<div style="margin:10px;">
					<div style="float:left;width:90px;">联系电话：</div> 
					<input name="cellphone" class="easyui-textbox" style="width:200px;"
						data-options="required:true" />
				</div>
				<div style="margin:10px;">
					<div style="float:left;width:90px;">地址：</div> 
					<input name="address" class="easyui-textbox"
						data-options="required:true,multiline:true"
						style="width:200px;height:60px" />
				</div>
			</form>
		</div>
		
	
	<!-- 修改会员的对话框 -->
	<div id="customer_edit_dialog" style="width:530px;height: 420px;padding-left:50px;">
		<form id="edit_form" method="post">
			<div style="margin:10px;">
				<div style="float:left;width:90px;line-height:30px;">会员编号：</div> 
				<input name="id" style="width:200px;height:30px"
					data-options="required:false" disabled />
			</div>
			<div style="margin:10px;">
				<div style="float:left;width:90px;line-height:30px;">姓名：</div> 
				<input name="name" style="width:200px;height:30px"
					data-options="required:true" />
			</div>
			<div style="margin:10px;">
				<div style="float:left;width:90px;line-height:30px;">性别：</div> 
				<select name="gender" style="width:200px;height:30px"
					data-options="required:true">
					<option value="男">男</option>
					<option value="女">女</option>
				</select>
			</div>
			<div style="margin:10px;">
				<div style="float:left;width:90px;line-height:30px;">折扣：</div> 
				<input name="discount" style="width:200px;height:30px"
					data-options="required:true" />
			</div>
			<div style="margin:10px;">
				<div style="float:left;width:90px;line-height:30px;">会员积分：</div> 
				<input type="text" name="integral" style="width:200px;height:30px"
					data-options="required:true" value="0" />
			</div>
			<div style="margin:10px;">
				<div style="float:left;width:90px;line-height:30px;">联系电话：</div> 
				<input name="cellphone" style="width:200px;height:30px"
					data-options="required:true" />
			</div>
			<div style="margin:10px;">
				<div style="float:left;width:90px;line-height:30px;">地址：</div> 
				<input name="address"
					data-options="required:true" style="width:300px;height:30px;" />
			</div>
		</form>
	</div>
		
	<!-- datagrid的工具栏 -->
	<div id="tb" style="padding:5px;height:auto">
		<div style="margin-bottom:5px">
		    <shiro:hasPermission name="sys:customer:add">
			<div id="tb_add" class="easyui-linkbutton" iconCls="icon-add" plain="true">添加</div>
			</shiro:hasPermission>
             <shiro:hasPermission name="sys:customer:update">
			<div id="tb_edit" class="easyui-linkbutton" iconCls="icon-edit" plain="true">编辑</div>
			</shiro:hasPermission>
			 <shiro:hasPermission name="sys:customer:delete">
			<div id="tb_remove" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</div>
			</shiro:hasPermission>
			<div id="tb_reload" class="easyui-linkbutton" iconCls="icon-reload" plain="true">刷新</div>
			<div id="tb_save" class="easyui-linkbutton" iconCls="icon-save" plain="true">保存</div>
			<!-- 搜索框 -->
			 <shiro:hasPermission name="sys:customer:search">
	        <div id="search"></div>
			<div id="options">
				<div data-options="name:'id',iconCls:'icon-ok'">会员编号</div>
				<div data-options="name:'name',iconCls:'icon-ok'">姓名/姓名关键字</div>
				<div data-options="name:'cellphone',iconCls:'icon-ok'">联系电话</div>
			</div>
			</shiro:hasPermission>
		</div>
		<!-- 通过日期区间搜索 -->
		<shiro:hasPermission name="sys:customer:search">
		<form id="search_date" method="post">
			注册日期  从: <input class="easyui-datebox" style="width:120px" name="firstDate" id="firstDate" />
			到: <input class="easyui-datebox" style="width:120px" name="lastDate" id="lastDate" />
			<a href="javascript:void(0)" id="btn_search_date" class="easyui-linkbutton" iconCls="icon-search">搜索</a>
		</form>
		</shiro:hasPermission>
	</div> 
	
	</div>
</body>
</html>